<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use app\middleware\Auth;
use app\middleware\Login;
use think\facade\Route;

Route::group(function () {
	Route::miss(function() {
		return '404 Not Found!';
	});
	
	Route::group('Config',function () {
		Route::get('getPrivacyPolicy', 'config/getPrivacyPolicy');
		Route::get('getUserAgreement', 'config/getUserAgreement');
		Route::get('getReturnAddress', 'config/getReturnAddress');
		Route::get('getRiskContent', 'config/getRiskContent');
		Route::get('getRiskCase', 'config/getRiskCase');
		Route::get('getScoreContent', 'config/getScoreContent');
		Route::get('getBannerList', 'config/getBannerList');
		Route::get('getMobile', 'config/getMobile');
		Route::get('getHelp', 'config/getHelp');
		Route::get('getUserAgreement', 'config/getUserAgreement');
		Route::get('getPrivacyPolicy', 'config/getPrivacyPolicy');
		Route::get('getUserinfoExplain', 'config/getUserinfoExplain');
		Route::get('getMpExplain', 'config/getMpExplain');
		Route::get('getRulesExplain', 'config/getRulesExplain');
		Route::get('getJDUrl', 'config/getJDUrl');
	});
	
	Route::group('/',function () {
		Route::any('/', 'Index/index');
	});
	Route::group('Notify',function () {
		Route::any('returnNotify', 'Notify/returnNotify');
		Route::any('withdrawNotify', 'Notify/withdrawNotify');
		Route::any('goodsOrderConfirm', 'Notify/goodsOrderConfirm');
	});
	
	
	Route::group('User',function () {
		Route::post('login', 'User/login');
		Route::post('register', 'User/register');
	});

    Route::group('Task',function () {
        Route::any('fenhong', 'Task/fenhong');
        Route::any('bill', 'Task/bill');
    });
	
	Route::group('Area',function () {
		Route::get('getRegion', 'Area/getRegion');
		Route::get('getProvince', 'Area/getProvince');
		Route::get('getCity', 'Area/getCity');
		Route::get('getDistrict', 'Area/getDistrict');
		Route::get('getHotCity', 'Area/getHotCity');
	});
	
	Route::group('Goods',function () {
		Route::get('/', 'Goods/index');
	});
	
	Route::group('Super',function () {
		Route::get('/', 'Super/index');
		Route::get('class', 'Super/class');
		
	});

    Route::group('Shop',function () {
        Route::get('/', 'Shop/index');
        Route::get('detail', 'Shop/detail');
    });
	
	#需要登陆
	Route::group(function () {
		
		Route::group('Config',function () {
			Route::get('getCustomer', 'config/getCustomer');
			Route::get('autoReply', 'config/autoReply');
			Route::get('getInviteContent', 'config/getInviteContent');
		});
		
		Route::group('User',function () {
			Route::get('getUserInfo', 'User/getUserInfo');
			Route::post('bindMobile', 'User/bindMobile');
			Route::post('setShopPassword', 'User/setShopPassword');
			Route::post('bindInvitecode', 'User/bindInvitecode');
			Route::post('giveMoney', 'User/giveMoney');
			Route::post('resetpwd', 'User/resetpwd');
			Route::get('getQRCode', 'User/getQRCode');
			Route::get('getUserMoneyList', 'User/getUserMoneyList');
			Route::get('getUserGoodsDevoteList', 'User/getUserGoodsDevoteList');
			Route::get('getUserConsumeQuotaList', 'User/getUserConsumeQuotaList');
			Route::get('getUserShopQuotaList', 'User/getUserShopQuotaList');
			Route::get('getUserSuperQuotaList', 'User/getUserSuperQuotaList');
			Route::get('getUserGoodsQuotaList', 'User/getUserGoodsQuotaList');
			Route::get('team', 'User/team');
			Route::post('withdraw', 'User/withdraw');
			Route::get('withdrawList', 'User/withdrawList');
			Route::post('resetTradepwd', 'User/resetTradepwd');
			Route::get('team', 'User/team');
			Route::get('getHelpList', 'User/getHelpList');
			Route::get('getCollectList', 'User/getCollectList');
			Route::post('closeTradepwd', 'User/closeTradepwd');
			Route::post('userEdit', 'User/userEdit');
			Route::post('recharge', 'User/recharge');
			Route::get('userMoney', 'User/userMoney');
			Route::post('changeMobile', 'User/changeMobile');
			Route::get('collect', 'User/collect');
			Route::get('coupon', 'User/coupon');
			Route::get('getImSign', 'User/getImSign');
			Route::get('userScore', 'User/userScore');
			Route::get('getInviteImage', 'User/getInviteImage');
			Route::get('getChild', 'User/getChild');
			Route::get('adviseClass', 'User/adviseClass');
			Route::get('getShopTeam', 'User/getShopTeam');
			Route::post('adviseAdd', 'User/adviseAdd');
			Route::post('scan', 'User/scan');
			Route::post('logoff', 'User/logoff');
		});
		

		
		
		Route::group('Bank',function () {
			Route::get('bank', 'Bank/bank');
			Route::get('class', 'Bank/class');
			Route::post('addBank', 'Bank/addBank');
			Route::post('deleteBank', 'Bank/deleteBank');
			Route::get('bankList', 'Bank/bankList');
			Route::post('editBank', 'Bank/editBank');
			Route::get('detail', 'Bank/detail');
		});
		
		
		Route::group('Shop',function () {

			Route::post('collect', 'Shop/collect');
			Route::post('apply', 'Shop/apply');
			Route::post('createOrder', 'Shop/createOrder');
			Route::post('orderPay', 'Shop/orderPay');
			Route::get('getPayment', 'Shop/getPayment');
		});
		
		Route::group('Advise',function () {
			Route::post('adviseAdd', 'Advise/adviseAdd');
			Route::get('class', 'Advise/class');
		});
		

		

		
		Route::group('Super',function () {
			Route::get('detail', 'Super/detail');
			Route::get('getAssessList', 'Super/getAssessList');
			Route::post('collect', 'Super/collect');
			Route::post('createOrder', 'Super/createOrder');
			Route::post('orderPay', 'Super/orderPay');
			Route::get('getPrice', 'Super/getPrice');
			Route::post('shopcarAdd', 'Super/shopcarAdd');
			Route::get('shopcarList', 'Super/shopcarList');
			Route::post('shopcarEdit', 'Super/shopcarEdit');
			Route::post('shopcarDelete', 'Super/shopcarDelete');
			Route::post('shopcarCreateOrder', 'Super/shopcarCreateOrder');
			Route::get('shopcarGetPrice', 'Super/shopcarGetPrice');
			Route::get('orderList', 'Super/orderList');
			Route::get('orderDetail', 'Super/orderDetail');
			Route::post('orderCancel', 'Super/orderCancel');
			Route::post('orderDelete', 'Super/orderDelete');
			Route::post('orderConfirm', 'Super/orderConfirm');
			Route::post('orderAssess', 'Super/orderAssess');
			Route::post('orderAfter', 'Super/orderAfter');
			Route::post('orderCancelAfter', 'Super/orderCancelAfter');
			Route::post('orderAfterReturn', 'Super/orderAfterReturn');
			Route::get('orderDetailList', 'Super/orderDetailList');
		});
		
		
		Route::group('Goods',function () {
			Route::get('detail', 'Goods/detail');
			Route::get('getAssessList', 'Goods/getAssessList');
			Route::post('collect', 'Goods/collect');
			Route::post('createOrder', 'Goods/createOrder');
			Route::post('orderPay', 'Goods/orderPay');
			Route::get('orderList', 'Goods/orderList');
			Route::get('orderDetail', 'Goods/orderDetail');
			Route::post('orderCancel', 'Goods/orderCancel');
			Route::post('orderDelete', 'Goods/orderDelete');
			Route::post('orderConfirm', 'Goods/orderConfirm');
			Route::post('orderAssess', 'Goods/orderAssess');
		});
		
		Route::group('Address',function () {
			Route::post('addAddress', 'Address/addAddress');
			Route::post('setDefaultAddress', 'Address/setDefaultAddress');
			Route::get('getDefaultAddress', 'Address/getDefaultAddress');
			Route::get('getAddress', 'Address/getAddress');
			Route::post('editAddress', 'Address/editAddress');
			Route::post('deleteAddress', 'Address/deleteAddress');
			Route::get('getAddressList', 'Address/getAddressList');
		});
		
	})->middleware(Login::class);
	
	
})->middleware([Auth::class])->allowCrossDomain();
